from django.urls import path
from . import views

app_name = 'airshow'

urlpatterns = [
    # 首页
    path('', views.index, name='index'),
    
    # 区域相关URL
    path('areas-view/', views.AreaListView.as_view(), name='area_list_view'),
    path('areas/<int:area_id>/', views.AreaDetailView.as_view(), name='area_detail'),
    
    # 参展商相关URL
    path('exhibitors/', views.ExhibitorListView.as_view(), name='exhibitor_list'),
    path('exhibitors/<int:exhibitor_id>/', views.ExhibitorDetailView.as_view(), name='exhibitor_detail'),
    
    # 活动日程相关URL
    path('schedule/', views.ScheduleListView.as_view(), name='schedule_list'),
    path('schedule/<int:event_id>/', views.ScheduleDetailView.as_view(), name='schedule_detail'),
    
    # 展品信息相关URL
    path('exhibit-info/', views.ExhibitInfoListView.as_view(), name='exhibit_info_list'),
    
    # 活动详情相关URL
    path('event-details/', views.EventDetailsListView.as_view(), name='event_details_list'),
    
    # 数据库操作
    path('data/<str:table>/', views.direct_data_view, name='direct_data'),
    path('data/<str:table>/add/', views.add_data_view, name='add_data'),
    path('data/<str:table>/edit/<int:pk>/', views.edit_data_view, name='edit_data'),
    path('data/<str:table>/delete/<int:pk>/', views.delete_data_view, name='delete_data'),
    path('data/<str:table>/export/', views.export_data_view, name='export_data'),
    path('data/<str:table>/import/', views.import_data_view, name='import_data'),
    
    # 区域管理
    path('areas-manage/', views.area_list, name='area_list'),
    path('areas-manage/add/', views.area_add, name='area_add'),
    path('areas-manage/edit/<int:pk>/', views.area_edit, name='area_edit'),
    path('areas-manage/delete/<int:pk>/', views.area_delete, name='area_delete'),
    
    # 表演者管理
    path('performers/', views.performer_list, name='performer_list'),
    path('performers/add/', views.performer_add, name='performer_add'),
    path('performers/edit/<int:pk>/', views.performer_edit, name='performer_edit'),
    path('performers/delete/<int:pk>/', views.performer_delete, name='performer_delete'),
    
    # 表演管理
    path('shows/', views.show_list, name='show_list'),
    path('shows/add/', views.show_add, name='show_add'),
    path('shows/edit/<int:pk>/', views.show_edit, name='show_edit'),
    path('shows/delete/<int:pk>/', views.show_delete, name='show_delete'),
    
    # 观众管理
    path('audiences/', views.audience_list, name='audience_list'),
    path('audiences/add/', views.audience_add, name='audience_add'),
    path('audiences/edit/<int:pk>/', views.audience_edit, name='audience_edit'),
    path('audiences/delete/<int:pk>/', views.audience_delete, name='audience_delete'),
    
    # 设备管理
    path('equipment/', views.equipment_list, name='equipment_list'),
    path('equipment/add/', views.equipment_add, name='equipment_add'),
    path('equipment/edit/<int:pk>/', views.equipment_edit, name='equipment_edit'),
    path('equipment/delete/<int:pk>/', views.equipment_delete, name='equipment_delete'),
    
    # 新闻管理
    path('news/', views.news_list, name='news_list'),
    path('news/add/', views.news_add, name='news_add'),
    path('news/edit/<int:pk>/', views.news_edit, name='news_edit'),
    path('news/delete/<int:pk>/', views.news_delete, name='news_delete'),
    
    # 出席管理
    path('attendances/', views.attendance_list, name='attendance_list'),
    path('attendances/add/', views.attendance_add, name='attendance_add'),
    path('attendances/edit/<int:pk>/', views.attendance_edit, name='attendance_edit'),
    path('attendances/delete/<int:pk>/', views.attendance_delete, name='attendance_delete'),
    
    # 观众信息相关URL
    path('audience-info/', views.AudienceInfoListView.as_view(), name='audience_info_list'),
    path('audience-info/<int:pk>/', views.AudienceInfoDetailView.as_view(), name='audience_info_detail'),
] 